From: root@procyon Date: Thu, 14 Sep 2006 07:19:39 +0000 (+0100) Subject: This patch add localtime to dumpcore filename. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15658^2~52^2~12 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=805b7b3995bcb952b8662b5328d5bb0066676194;p=xen.git This patch add localtime to dumpcore filename. And it add '-imcomplete' if failed. Signed-off-by: Akio Takebe --- diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index e1e9207041..259aaab331 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -982,11 +982,14 @@ class XendDomainInfo: try: if not corefile: - corefile = "/var/xen/dump/%s.%s.core" % (self.info['name'], - self.domid) + this_time = time.strftime("%Y-%m%d-%H%M.%S", time.localtime()) + corefile = "/var/xen/dump/%s-%s.%s.core" % (this_time, + self.info['name'], self.domid) xc.domain_dumpcore(self.domid, corefile) except: + corefile_incomp = corefile+'-incomplete' + os.rename(corefile, corefile_incomp) log.exception("XendDomainInfo.dumpCore failed: id = %s name = %s", self.domid, self.info['name'])